import type { DefaultTheme } from 'vitepress'

// 导航栏配置 - 针对Java后端开发
export const nav: DefaultTheme.Config['nav'] = [
  { text: '导航', link: '/nav', activeMatch: '^/nav' },
  {
    text: 'Java基础',  // Java基础知识模块
    items: [
      { text: 'Java核心语法', link: '/java/basic/syntax' },
      { text: '面向对象', link: '/java/basic/oop' },
      { text: '集合框架', link: '/java/basic/collection' },
      { text: 'IO流', link: '/java/basic/io' },
      { text: '并发编程', link: '/java/concurrent/' },
      { text: 'JVM原理', link: '/java/jvm/' }
    ],
    activeMatch: '^/java'
  },
  {
    text: '主流框架',  // Java主流框架
    items: [
      { text: 'Spring Framework', link: '/framework/spring/' },
      { text: 'Spring Boot', link: '/framework/springboot/' },
      { text: 'Spring Cloud', link: '/framework/springcloud/' },
      { text: 'MyBatis', link: '/framework/mybatis/' },
      { text: 'Hibernate/JPA', link: '/framework/jpa/' }
    ],
    activeMatch: '^/framework'
  },
  {
    text: '数据库',  // 数据库相关
    items: [
      { text: 'MySQL', link: '/database/mysql/' },
      { text: 'Redis', link: '/database/redis/' },
      { text: 'MongoDB', link: '/database/mongodb/' },
      { text: '数据库设计', link: '/database/design/' }
    ],
    activeMatch: '^/database'
  },
  {
    text: '微服务',  // 微服务架构
    items: [
      { text: '服务注册与发现', link: '/microservice/registry/' },
      { text: '配置中心', link: '/microservice/config/' },
      { text: '网关', link: '/microservice/gateway/' },
      { text: '熔断降级', link: '/microservice/circuit-breaker/' },
      { text: '分布式事务', link: '/microservice/transaction/' }
    ],
    activeMatch: '^/microservice'
  },
  {
    text: '消息队列',  // 消息中间件
    items: [
      { text: 'RabbitMQ', link: '/mq/rabbitmq/' },
      { text: 'Kafka', link: '/mq/kafka/' },
      { text: 'RocketMQ', link: '/mq/rocketmq/' }
    ],
    activeMatch: '^/mq'
  },
  { text: '源码阅读', link: '/analysis/spring/', activeMatch: '^/analysis' },  // 源码分析
  {
    text: '开发工具',  // 工具与效率
    items: [
      { text: 'IDEA技巧', link: '/tools/idea/' },
      { text: 'Maven/Gradle', link: '/tools/build/' },
      { text: 'Git使用', link: '/tools/git/' },
      { text: 'Linux命令', link: '/tools/linux/' },
      { text: 'Docker', link: '/tools/docker/' }
    ],
    activeMatch: '^/tools'
  },
  {
    text: '笔记',  // 日常笔记与踩坑
    items: [
      { text: '日常笔记', link: '/daily-notes/', activeMatch: '^/daily-notes' },
      {
        text: '踩坑记录',  // 各种踩坑经验
        items: [
          { text: 'Spring踩坑', link: '/pit/spring' },
          { text: 'MyBatis踩坑', link: '/pit/mybatis' },
          { text: '数据库踩坑', link: '/pit/database' },
          { text: '微服务踩坑', link: '/pit/microservice' },
          { text: '部署踩坑', link: '/pit/deploy' }
        ]
      }
    ],
    activeMatch: '^/daily-notes|pit'
  },
  {
    text: '提效工具',  // 软件工具推荐
    items: [
      {
        text: '软件推荐与配置',
        items: [
          { text: '多平台软件', link: '/efficiency/software/cross-platform' },
          { text: 'Mac 平台', link: '/efficiency/software/mac' },
          { text: 'Windows 平台', link: '/efficiency/software/windows' },
          { text: '浏览器设置与扩展', link: '/efficiency/software/browser' },
          { text: 'IntelliJ IDEA 配置', link: '/efficiency/software/idea' }
        ]
      },
      { text: '在线工具', link: '/efficiency/online-tools' },
      { text: '书签脚本', link: '/efficiency/bookmark-scripts' }
    ],
    activeMatch: '^/efficiency'
  },
  {
    text: '关于',  // 关于作者
    link: '/about'
  }
]
